package vocoders;

public interface RPE_LTP_if {
	// Parameters
	public static int PRIMARY_FRAME_SIZE = 160;
	public static int SECONDARY_FRAME_SIZE = 40;
	public static int STP_ORDER = 8;
	
	public static double ALPHA_OF = 0.998992919921875;
	public static double BETA_PE = 0.8599853515625;
	
	public static double[] LARc_A={20,20,20,20,13.637,15,8.334,8.824};
	public static double[] LARc_B={0,0,4,-5,0.184,-3.5,-0.666,-2.235};
	public static int[] LARc_min={-32,-32,-16,-16,-8,-8,-4,-4};
	public static int[] LARc_max={31,31,15,15,7,7,3,3};
	
	// Building blocks
	public void cc_filtering(double data[],double[] result);
	public void pe_filtering(double data[],double[] result);
	public void autocorr(double data[],double[] result);
	public void schur_alg(double xcorr[],double[] gamma);
	public void gamma2lar(double[] gamma, double[] lar);
	public void lar_coding(double[] lar, int[] coded_lar);
	public void lar_decoding(int[] coded_lar,double[] decoded_lar);
	public void lar_interpolation(double[] prev_lar,double[] crt_lar);
	public void lar2gamma(double[] lar,double[] gamma);
	public void st_err_lattice_filter(double[] frame,double[] error_frame);
	
	public void ltp_params(double[] sframe,double[] result);
	public void ltp_coding(double[] ltp_prms, int[] result);
	public void ltp_decoding(int[] coded_ltp, double[] decoded_ltp);
	public void anti_aliasing_filter(double[] serrframe, double[] result);
	public void decimation(double serrframe, double[] result);
	public void rpe_indexing(double[] dserrframe, double[] rpe_params);
	public void apcm_quantization(double[] rpe_params, int[] coded_rpe_params);
	public void apcm_decoding(int[] coded_rpe_params, double[] decoded_rpe_params);
	public void rpe_grill_positioning(double[] decoded_rpe_params,double[] result);	

}
